


using System;
using Payroll.BusinessLogic.EmployeeManagement;
using Payroll.BusinessLogic.Infrastructure;

namespace Payroll.BusinessLogic.Audit
{
    /// <summary>
    /// Represents a search log
    /// </summary>
    public partial class SearchLog : BaseEntity
    {
        #region Properties
        /// <summary>
        /// Gets or sets the search log identifier
        /// </summary>
        public int SearchLogId { get; set; }

        /// <summary>
        /// Gets or sets the search term
        /// </summary>
        public string SearchTerm { get; set; }

        /// <summary>
        /// Gets or sets the customer identifier
        /// </summary>
        public int EmployeeId { get; set; }

        /// <summary>
        /// Gets or sets the date and time of instance creation
        /// </summary>
        public DateTime CreatedOn { get; set; }

        #endregion 

        #region Custom Properties

        /// <summary>
        /// Gets the customer
        /// </summary>
        public Employee Customer
        {
            get
            {
                return IoC.Resolve<IEmployeeService>().GetEmployeeById(this.EmployeeId);
            }
        }
        #endregion
    }

}
